﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StaffInformation;

namespace StaffInformation
{
    class Program
    {
        static void Main(string[] args)
        {
            string name = "";
            int age = 0;

            BuildNameAndAge(ref name, ref age);
            Employee emp = new Employee(name, age);

            Console.WriteLine("Staff Name: {0}, and Staff age: {1}, He(She) is {2}", emp.Name, emp.Age, emp.StaffType);

            name = "";
            age = 0;

            BuildNameAndAge(ref name, ref age);
            Contractor con = new Contractor(name, age);
            Console.WriteLine("Staff Name: {0}, and Staff age: {1}, He(She) is {2}", con.Name, con.Age, con.StaffType);

            Console.ReadLine();
        }

        static void BuildNameAndAge(ref string name, ref int age)
        {
            Console.WriteLine("Please input staff name");
            name = Console.ReadLine();
            Console.WriteLine("Please input staff age");
            age = int.Parse(Console.ReadLine());
        }
    }
}
